home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / PROGNG_C / M2COMP.LZH / STRINGS.DEF < prev    next >
Text File  |  1987-06-21  |  870b  |  41 lines

  1. DEFINITION MODULE Strings;
  2.  
  3. (* (C) Copyright 1987 Fitted Software Tools. All rights reserved. *)
  4.  
  5. (*
  6.     A strings is an ARRAY OF CHAR.
  7.     If the string does not completely fill the array, it is terminated
  8.     by a 0C.
  9. *)
  10.  
  11. PROCEDURE CompareStr( s1, s2 :ARRAY OF CHAR ) :INTEGER;
  12. (*
  13.     Returns:
  14.         0 if s1 = s2
  15.        -1 if s1 < s2
  16.        +1 if s1 > s2
  17. *)
  18.  
  19. PROCEDURE Assign( VAR source, dest :ARRAY OF CHAR );
  20. (*
  21.     copies source to dest
  22. *)
  23.  
  24. PROCEDURE Length( s :ARRAY OF CHAR ) :CARDINAL;
  25. (*
  26.     returns the length of s
  27. *)
  28.  
  29. PROCEDURE Concat( s1, s2 :ARRAY OF CHAR; VAR result :ARRAY OF CHAR );
  30. (*
  31.     Concatenates s2 to s1 and puts it in result
  32. *)
  33.  
  34. PROCEDURE Pos( subs, s :ARRAY OF CHAR ) :CARDINAL;
  35. (*
  36.     Returns:
  37.         index of first occurrence of subs in s or
  38.         > HIGH(s) if no match is found
  39. *)
  40.  
  41. END Strings.